<!--
 * @Description: 
 * @Autor: Bingo
 * @Date: 2024-08-15 14:54:08
 * @LastEditors: Bingo
 * @LastEditTime: 2024-08-15 16:01:49
-->
<template>
  <div class="home-section-func-f">
    <div
      class="home-section-func-f-item"
      v-for="item in FuncList"
      :key="item.name"
      @click="doHandleFcClick(item)"
      v-changeBig="1.1"
    >
      <div class="ifont-box" :style="{ backgroundColor: item.bgColor }">
        <i :class="`iconfont ${item.icont}`"></i>
      </div>
      <span
        class="home-section-func-f-item-label"
        :class="
          Props.currentActiveItem == item.name
            ? 'home-section-func-f-item-label-active'
            : ''
        "
        >{{ item.name }}</span
      >
    </div>
  </div>
</template>
<script lang="ts" setup>
import { useRouter } from "vue-router";
import { FuncList } from "../config";
import { FuncList_Intf } from "../type";
const Routes = useRouter();
const doHandleFcClick = (item: FuncList_Intf) => Routes.push(item.url as string);
const Props = defineProps({
  currentActiveItem: {
    type: String,
    default: "",
  },
});
</script>
<style scoped lang="less">
.home-section-func-f {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  justify-content: space-around;
  &-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-bottom: 12px;
    .ifont-box {
      width: 60px;
      height: 60px;
      border-radius: 8px;
      line-height: 60px;
      text-align: center;
    }
    .iconfont {
      font-size: 28px;
      color: white;
    }
    &-label {
      margin-top: 10px;
      font-size: 13px;
      color: #999;
      &-active {
        color: #000000;
        font-size: 15px;
        font-weight: bold;
      }
    }
  }
}
</style>
